﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Admin/Admin2.master" AutoEventWireup="true" CodeFile="QuanLyNCC.aspx.cs" Inherits="Admin_QuanLyNCC" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
    <asp:MultiView ID="MultiView1" runat="server">
        <asp:View ID="View1" runat="server">
        <fieldset>
                <legend style="text-align:center;font:18px bold; color:#000000">Danh Sách Nhà Cung Cấp</legend>
<div align="center"><asp:GridView ID="gvSanPham" runat="server" AutoGenerateColumns="False" 
                         Width="700px" BorderColor="#D2D2D2" 
                        BorderStyle="Solid" BorderWidth="1px" AllowPaging="True" 
                    AllowSorting="True" CellPadding="2" CellSpacing="3" DataKeyNames="MaNhaCC" 
                     onsorting="gvSanPham_Sorting" onrowdeleting="gvSanPham_RowDeleting" 
                    PageSize="5" onpageindexchanging="gvSanPham_PageIndexChanging" 
                    onrowcancelingedit="gvSanPham_RowCancelingEdit" 
                    onrowdatabound="gvSanPham_RowDataBound" onrowediting="gvSanPham_RowEditing" 
                    onrowupdating="gvSanPham_RowUpdating">
                        <Columns>
<asp:BoundField DataField="MaNhaCC" HeaderText="Mã NCC" SortExpression="MaNhaCC" ReadOnly="True"></asp:BoundField>
                            <asp:BoundField DataField="TenNhaCC" HeaderText="Tên NCC" 
                                SortExpression="TenNhaCC" />
                            <asp:BoundField DataField="DiaChi" HeaderText="Địa Chỉ" 
                                SortExpression="DiaChi" />
                            <asp:BoundField HeaderText="Điện Thoại" DataField="DienThoai" 
                                SortExpression="DienThoai" />
                            <asp:TemplateField HeaderText="Xóa">
                                <ItemTemplate>
                                <div style="vertical-align:middle;margin-left:10px;">
                                <asp:LinkButton ID="LinkButton2" CssClass="btnicon2" runat="server" 
                                        CommandName="Delete" 
                                        OnClientClick="return confirm('Bạn có chắc chắn muốn xóa nhà cung cấp này không?');" 
                                        ToolTip="Xóa nhà cung cấp"></asp:LinkButton>
                                    <!--<asp:LinkButton ID="LinkButton1" CssClass="btnicon1" runat="server" 
                                        CommandName="Edit" ToolTip="Sửa sản phẩm" 
                                        CommandArgument='<%# Eval("MaNhaCC") %>'></asp:LinkButton>
                                    
                                    <asp:LinkButton ID="LinkButton3" CssClass="btnicon3" runat="server"></asp:LinkButton>
                                    <asp:LinkButton ID="LinkButton4" CssClass="btnicon4" runat="server"></asp:LinkButton>
                                    <asp:LinkButton ID="LinkButton5" CssClass="btnicon5" runat="server"></asp:LinkButton>-->
                                    </div>
                                </ItemTemplate>
                                <ItemStyle HorizontalAlign="Center" VerticalAlign="Middle" Width="16px" />
                            </asp:TemplateField>
                            <asp:CommandField ButtonType="Image" CancelText="Thoát" 
                                EditImageUrl="~/Admin/images/table/edit-icon1.png" HeaderText="Sửa" 
                                ShowEditButton="True" UpdateText="Ghi" />
                        </Columns>
                        <HeaderStyle BackColor="#666666" BorderColor="#D2D2D2" BorderStyle="Solid" 
                            BorderWidth="1px" Font-Bold="True" ForeColor="White" Height="50px" />
                        <PagerStyle CssClass="pagerstyle" />
                        <RowStyle Height="30px" HorizontalAlign="Center" VerticalAlign="Middle" />

                    </asp:GridView>
                    <br />
    <asp:Button ID="btThemMoi" runat="server" Text="Thêm Mới" 
        onclick="btThemMoi_Click" Height="25px" Width="100px" /></div>
                    </fieldset>
        </asp:View>
        <asp:View ID="View2" runat="server">
        <table border="0" cellpadding="0" cellspacing="0"  id="id-form">
                
                    <tr>
                        <td class="style3" style="font-size: 14px">
                            Tên Nhà Cung Cấp :&nbsp;&nbsp;
                        </td>
                        <td class="style1">
                            <asp:TextBox ID="txttenqc" runat="server" CssClass="inp-form"></asp:TextBox>                        
                            <asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" 
                                ControlToValidate="txttenqc" ErrorMessage="*" ForeColor="Red"></asp:RequiredFieldValidator>
                        </td>
                    </tr>
                    
                    <tr>
                        <td class="style3" style="font-size: 14px">
                            Địa Chỉ :&nbsp;&nbsp;
                        </td>
                        <td class="style1">
                            <asp:TextBox ID="txtlink" runat="server" CssClass="inp-form"></asp:TextBox>                        
                            <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" 
                                ControlToValidate="txttenqc" ErrorMessage="*" ForeColor="Red"></asp:RequiredFieldValidator>
                        </td>
                    </tr>
                    <tr>
                        <td class="style3" style="font-size: 14px">
                            Số Điện Thoại :&nbsp;&nbsp;
                        </td>
                        <td class="style1">
                            <asp:TextBox ID="txtSoDT" runat="server" CssClass="inp-form"></asp:TextBox><asp:RegularExpressionValidator
                                ID="RegularExpressionValidator1" runat="server" 
                                ErrorMessage="Số điện thoại phải có 10 hoặc 11 số" 
                                ControlToValidate="txtSoDT" ForeColor="Red" 
                                ValidationExpression="\d{10,11}"></asp:RegularExpressionValidator>
                        </td>
                    </tr>
                    
                    <tr>
                        <td colspan=3 style="font-size: 14px" align="center">
                            <asp:Button ID="btthem" runat="server" Text="Thêm" OnClick="btthem_Click" 
                                Height="25px" Width="50px" />
                        </td>
                        
                    </tr>
                </table>
        </asp:View>
    </asp:MultiView>

</asp:Content>

